package org.redmagic.spring;

import java.util.HashMap;
import java.util.Map;

import org.redmagic.api.HttpConnection;

public class StubbedHttpConnection implements HttpConnection {

    private static Map<String, String> stubbedProperties;
    
    static {
        stubbedProperties = new HashMap<String, String>();
        stubbedProperties.put("http://www.bluemagic.com/property/database/user?release=1.0&tags=production", "PRODUCTION_USER");
        stubbedProperties.put("http://www.bluemagic.com/property/database/user?release=1.0", "RELEASE_USER");
        stubbedProperties.put("http://www.bluemagic.com/property/database/user", "BASE_USER");

        stubbedProperties.put("http://www.bluemagic.com/property/database/password", "BASE_PASSWORD");
    }
    
    public String call(String urlString) {
        return stubbedProperties.get(urlString);
    }

}
